﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

/// <summary>
/// 分页控件页数据参数类
/// </summary>
public class PageBean
{

    #region 私有变量
    private string tableList = "*";
    private string tableName;
    private string selectOrderID;
    private string selectOrder;
    private string selectWhere;
    private int pageIndex;
    private int pageSize;

    #endregion

    public PageBean()
    {
        //
        // TODO: 在此处添加构造函数逻辑
        //
    }

    #region 属性
    /// <summary>
    /// 设置显示的字段值
    /// </summary>
    public string TableList
    {
        get { return tableList; }
        set { this.tableList = value; } 
    }

    /// <summary>
    /// 设置表名
    /// </summary>
    public string TableName
    {
        get { return tableName; }
        set { this.tableName = value; } 
    }

    /// <summary>
    /// 设置主键字段
    /// 注意：只支持单一主键，不支持复合主键
    /// </summary>
    public string SelectOrderID
    {
        get { return selectOrderID; }
        set { this.selectOrderID = value; } 
    }

    /// <summary>
    /// 设置排序字段
    /// 格式为： <字段名> 或<字段名> DESC
    /// </summary>
    public string SelectOrder
    {
        get { return selectOrder; }
        set { this.selectOrder = value; }
    }

    /// <summary>
    /// 设置排序字段
    /// 格式为： <字段名> 或<字段名> DESC
    /// </summary>
    public string SelectWhere
    {
        get { return selectWhere; }
        set { this.selectWhere = value; }
    }

    /// <summary>
    /// 设置页号
    /// </summary>
    public int PageIndex
    {
        get { return pageIndex; }
        set { this.pageIndex = value; }
    }

    /// <summary>
    /// 设置每页显示数
    /// </summary>
    public int PageSize
    {
        get { return pageSize; }
        set { this.pageSize = value; }
    }

    #endregion
}
